class Solution(object):
    def canBeIncreasing(self, nums):
        n = len(nums)
        state = 0
        last = nums[0]
        for i in range(1, n):
            if nums[i] <= last:
                if state:
                    return False
                else:
                    if i >= 2:
                        if nums[i] > nums[i - 2]:
                            last = nums[i]
                            state = 1
                        else:
                            state = 1
                    else:
                        last = nums[i]
                        state = 1
            else:
                last = nums[i]
        return True

